$(document).ready(function(){

		$('#rotador').bxSlider({
			mode:'horizontal',
			
			auto: true,
			speed:1000,
			pause:7000,
			pager:false,
			controls:true,
			prevSelector: '#v-slide-prev',
			nextSelector: '#v-slide-next'
		});
		
		$('#slide-up').bxSlider({
			mode:'vertical',
			auto: true,
			speed:1000,
			pause:5000,
			pager:false,
			controls:true,
			prevSelector: '#n-slide-prev',
			nextSelector: '#n-slide-next'
		});
		
		$('#prelated-rotador').bxSlider({
			mode:'horizontal',
			auto: true,
			speed:1000,
			pause:5000,
			pager:false,
			controls:true,
			displaySlideQty: 4,
			prevSelector: '#pr-prev',
			nextSelector: '#pr-next'
		});
		
		$('#timeline').bxSlider({
			mode:'horizontal',
			auto: true,
			speed:1000,
			pause:5000,
			pager:false,
			controls:true,
			displaySlideQty: 4,
			moveSlideQty:2,
			prevSelector: '#pr-prev',
			nextSelector: '#pr-next',
			easing: 'easeInBack'
		});
		
		$(function(){
		// assign the slider to a variable
			var slider = $('#photo-rotator').bxSlider({
			controls: false
			});
			
			// assign a click event to the external thumbnails
			$('.thumbs a').click(function(){
			var thumbIndex = $('.thumbs a').index(this);
			// call the "goToSlide" public function
			slider.goToSlide(thumbIndex);
			
			// remove all active classes
			$('.thumbs a').removeClass('pager-active');
			// assisgn "pager-active" to clicked thumb
			$(this).addClass('pager-active');
			// very important! you must kill the links default behavior
			return false;
			});
			
			// assign "pager-active" class to the first thumb
			$('.thumbs a:first').addClass('pager-active');
		});
		
		$(function(){

			$(".slidingDiv").hide();
			$(".show_hide").show();

			$('.show_hide').click(function(){
			$(".slidingDiv").slideToggle();
			});

		});
		
	});
	
	$('.current-page-ancestor').addClass('current-menu-item');
	$('.current-category-ancestor').addClass('current-menu-item');
	
	$("#main-menu nav ul li").addClass("blue-grad");
	$("#main-menu nav ul li.current-menu-item").addClass("tur-grad");
	$("#main-menu nav ul li").addClass("gradient");
	$('#main-menu nav ul li').hover(function () {
      $(this).toggleClass("green-grad");
	  $(this).removeClass("blue-grad");
    });
	$('#main-menu nav ul li').mouseout(function () {
      $(this).toggleClass("blue-grad");
	  $(this).removeClass("green-grad");
    });
	$("#main-menu nav ul li:first-child").addClass("left-rad");
	$("#main-menu nav ul li:last-child").addClass("right-rad");
	$("#sidebar .sub-menu ul li:last-child").addClass("last-child");
	
	$('#great-pod .pod a').hover(function () {
      $(this).toggleClass("green-grad");
	  $(this).removeClass("dark-grad");
    });
	$('#great-pod .pod a').mouseout(function () {
      $(this).toggleClass("dark-grad");
	  $(this).removeClass("green-grad");
    });	
	
	$('#sidebar .pod a.link').hover(function () {
      $(this).toggleClass("green-grad");
	  $(this).removeClass("dark-grad");
    });
	$('#sidebar .pod a.link').mouseout(function () {
      $(this).toggleClass("dark-grad");
	  $(this).removeClass("green-grad");
    });	
	
	$("#the-articles article:first-child").addClass("first-article");
	
	if ($('.cat-producto').length)
        $('.menu-item-141').addClass("tur-grad");
	